Apparatuses for performing a game while allowing two screens to display different images are commonly used. For example, one screen is displaying an image of a virtual space as viewed obliquely while the other screen is displaying an image of the virtual space as viewed from above.
However, it is difficult to apply such a technique directly to control different control objects on a single screen.
With this in mind, it is an object of this embodiment to provide an information processing program that can control different control objects on a single screen.
To achieve the object, this embodiment has the following features.
An information processing program according to an example of this embodiment is an information processing program to be executed by a computer in an information processing apparatus which performs information processing based on an operation performed on an operation section, and causes a display section to display an image. The information processing program causes the computer to execute: an operation data obtaining step of obtaining operation data from the operation section; a first control step of controlling a first control object in a virtual space, based on the operation data; a first image generation step of generating a first image based on control performed on the first control object; a second control activation step of activating control to be performed on a second control object if it is determined based on the operation data that there is a first instruction; a second control step of controlling the second control object, based on the operation data, in addition to the control of the first control object based on the operation data in the first control step, if the control to be performed on the second control object is active; a third image generation step of generating a second image containing the second control object, and generating a third image obtained by superimposing the second image on the first image, if the control to be performed on the second control object is active; and a displaying step of causing the display section to display the first image or the third image.
According to the above feature, when the control to be performed on the second control object is active, the first control object is controlled, and at the same time, the second control object is also controlled, based on operation data from the operation section. A third image is generated that is obtained by superimposing a second image containing the second control object on a first image based on the first control object. As a result, while the third image obtained by superimposing the second image on the first image is being displayed on a single screen, the first control object and the second control object can be simultaneously controlled.
Further, the information processing program may cause the computer to further execute, in the first control step, controlling the first control object, based on first data and second data included in the operation data, and in the second control step, controlling the second control object, based on the first data, and third data included in the operation data.
According to the above feature, the first control object can be controlled, and at the same time, the second control object can be controlled, based on the first data contained in the operation data. Further, the first control object can be controlled based on the second data included in the operation data, and the second control object can be controlled based on the third data included in the operation data. As a result, the two control objects can both be controlled based on a portion of the operation data, and meanwhile, the two control objects can be separately controlled based on another portion of the operation data.
Further, the information processing program may cause the computer to further execute, in the first control step, updating a state of the first control object, based on the first data, and in the second control step, updating a state of the second control object, based on the first data. The information processing program may cause the computer to further execute, in the first control step, performing predetermined information processing based on a state of the first control object if it is determined based on the second data that there is a second instruction. The information processing program may cause the computer to further execute, in the second control step, performing predetermined information processing based on a state of the second control object if it is determined based on the third data that there is a third instruction.
According to the above feature, for example, while the first control object and the second control object are controlled based on the first data, then if there is a second instruction, predetermined information processing is performed based on a state of the first control object, or then if there is a third instruction, another information processing is performed based on a state of the second control object.
Further, the operation section may include at least one of an inertial sensor and a direction input section, and a plurality of keys. The first data may be at least one of data output from the inertial sensor and data related to an operation performed on the direction input section. The second data and the third data may be related to operations performed on different ones of the plurality of keys.
According to the above feature, the first control object and the second control object can be simultaneously controlled based on the first data from an inertial sensor and a direction input section. The first control object and the second control object can be separately controlled based on operations performed on different ones of a plurality of keys.
Further, the first control object may be a first object or a virtual camera in the virtual space. The information processing program may cause the computer to further execute, in the first control step, performing control to move the first object or the virtual camera, based on the operation data.
According to the above feature, the first object or the virtual camera in the virtual space can be controlled based on the operation data.
Further, the first control object may be for determining an aiming point.
According to the above feature, the aiming point can be controlled based on the operation data.
Further, the first control object may be a virtual camera in the virtual space. The first image generated in the first image generation step may be an image of the virtual space generated using the virtual camera.
According to the above feature, the virtual camera can be controlled based on the operation data, and an image captured by the virtual camera can be displayed as a first image.
Further, a predetermined character may be provided in the virtual space. The information processing program may cause the computer to further execute a first movement step of causing the predetermined character to move in the virtual space, based on fourth data included in the operation data.
According to the above feature, the predetermined character in the virtual space can be moved based on the fourth data.
Further, the second image generated in the third image generation step may be a map image of the virtual space. The information processing may be for performing a predetermined game.
According to the above feature, a map image of the virtual space can be displayed. Specifically, the virtual camera can be controlled based on the operation data, and the map image can be displayed and superimposed on a first image of the virtual space captured by the virtual camera.
Further, the second control object may be a cursor displayed on the map image. The information processing program may cause the computer to further execute a second movement step of moving the predetermined character to a position in the virtual space indicated by the cursor if it is determined based on third data included in the operation data that there is a third instruction.
According to the above feature, the location of the predetermined character can be moved to the position of the cursor by controlling the cursor on the map image.
Further, the game may be performed by a plurality of information processing apparatuses operated by a plurality of users. The information processing program may cause the computer to further execute a notification step of giving a notification to another information processing apparatus when the third image is being displayed on the display section. The information processing program may cause the computer to further execute, if receiving the notification from another information processing apparatus, generating the first image which allows for recognition of displaying of the third image on a display section of the other information processing apparatus, in the first image generation step.
According to the above feature, in a game that is played by a plurality of users, a user who is keeping the third image obtained by superimposing the second image on the first image displayed, can be recognized by other users. As a result, a user who is keeping the second image displayed can be recognized by other users, and a situation where a user who is keeping the second image displayed is unduly advantageous can be avoided, so that the balance of the game can be kept.
Further, the information processing program may cause the computer to further execute, in the first image generation step, if the control to be performed on the second control object is inactive, generating the first image in a first form, and if the control to be performed on the second control object is active, generating the first image in a second form which it is more difficult for a user to visually recognize than in the first form. The information processing program may cause the computer to further execute, in the displaying step, if the control to be performed on the second control object is inactive, causing the display section to display the first image in the first form, and if the control to be performed on the second control object is active, causing the display section to display a third image obtained by superimposing the second image of the first image in the second form.
According to the above feature, when the control to be performed on the second control object is active, i.e., the second image is being displayed, the visibility of the first image is reduced, compared to when the second image is not being displayed. As a result, a situation where a user who is keeping the second image displayed is unduly advantageous can be avoided, so that the balance of the game can be kept.
Further, the operation section may be a controller that is attachable to and detachable from the information processing apparatus.
According to the above feature, the above process can be performed using an attachable and detachable operation section.
Further, another example of this embodiment may be an information processing apparatus for executing the above information processing program. Further, still another example may be an information processing system for executing the above process. The information processing system may include one or more apparatuses. Further, still another example may be an information processing method that is performed in the above information processing apparatus or information processing system.
According to this embodiment, a first image and a second image are displayed on a single screen, and a first control object and a second control object can be simultaneously controlled.
These and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.